import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  code: [{ required: true, message: "编码为必填项", trigger: "blur" }],
  name: [{ required: true, message: "设备名称为必填项", trigger: "blur" }],
  status: [{ required: true, message: "状态为必填项", trigger: "change,blur" }],
  number: [{ required: true, message: "设备号为必填项", trigger: "blur" }],
});
